package com.ju.demo.util;

import java.util.Random;

public class RandomCountUtil {
    /**
     * 生成10位的随机数用于存放数据库
     * @return
     */
    public static String getRandomNumber() {
        StringBuilder sb = new StringBuilder(10);
        Random random = new Random();
        for (int i = 0; i < 10; i++) {
            int digit = random.nextInt(10);
            sb.append(digit);
        }
        return sb.toString();
    }
}
